--------------------------------------------------
-- Level code
-- Created 15:13 2019-9-17
--------------------------------------------------

require("Libraries.nsmbwalls")

-- Run code on level start
function onStart()
    --Your code here
end

-- Run code every frame (~1/65 second)
-- (code will be executed before game logic will be processed)
function onTick()
    if Level.winState() == 6 then
		Level.winState(7)
        mem(0xB2C5A0,FIELD_WORD, 380) -- changes exit timer, undocumented in global memory for some reason
		-- SFX.play(19)
	end
    --Text.print(mem(0xB2C5A0,FIELD_WORD), 20, 220)
end

-- Run code when internal event of the SMBX Engine has been triggered
-- eventName - name of triggered event
function onEvent(eventName)
    --Your code here
end

